package com.techsoul.module.order.enmus;

public enum SalesOrderEventEnum {
    SO_001_001("SO_001_001", "创建订单", "created", "已创建"),
    SO_001_002("SO_001_002", "保存订单", "created", "已创建"),
    SO_002_001("SO_002_001", "提交订单", "submitted", "已提交"),
    SO_003_001("SO_003_001", "订单已审核", "audited", "已审核"),
    SO_004_001("SO_004_001", "提案确认中", "audited", "已审核"),
    SO_004_002("SO_004_002", "提案已确认", "50030", "已审核"),
    SO_004_003("SO_004_003", "合同已签订", "50030", "待支付"),
    SO_005_001("SO_005_001", "待支付", "50030", "待支付"),
    SO_005_002("SO_005_002", "支付成功", "50030", "待发货"),
    SO_006_001("SO_006_001", "生成发货计划", "50060", "待发货"),
    SO_006_002("SO_006_002", "已发货", "50061", "已发货");

    private final String eventCode;
    private final String eventName;
    private final String status;
    private final String statusName;

    SalesOrderEventEnum(String eventCode, String eventName, String status, String statusName) {
        this.eventCode = eventCode;
        this.eventName = eventName;
        this.status = status;
        this.statusName = statusName;
    }

    public String getEventCode() {
        return eventCode;
    }

    public String getEventName() {
        return eventName;
    }

    public String getStatus() {
        return status;
    }

    public String getStatusName() {
        return statusName;
    }

    public static SalesOrderEventEnum getEventEnum(String eventCode) {
        for (SalesOrderEventEnum bean : SalesOrderEventEnum.values()) {
            if (bean.getEventCode().equals(eventCode)) {
                return bean;
            }
        }
        return null;
    }
}
